package com.sun.module_base.widget

import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import com.sun.module_base.model.AppThemeState
import com.sun.module_base.theme.AppMaterialTheme
import com.sun.module_base.theme.SystemUiController

/**
 *@author:sunc
 *@time :2025/8/13 15:03
 *@desc: 描述
 */
@Composable
fun BaseScreen(
    appThemeState: AppThemeState,
    systemUiController: SystemUiController?,
    content: @Composable () -> Unit
) {
    AppMaterialTheme(darkTheme = appThemeState.darkTheme, colorPallet = appThemeState.pallet) {
        systemUiController?.setSystemBarsColor(
            color = MaterialTheme.colorScheme.onPrimaryContainer,
            darkIcons = appThemeState.darkTheme
        )
        content.invoke()
    }
}